"""
python读写csv
"""

# python自带的读取csv格式的模块
import csv

with open("csvdemo1.csv","w",encoding="utf-8") as file:
    writer = csv.writer(file)
    # 先写标题
    writer.writerow(["id","name","age","score"])
    # 写多条数据
    writer.writerows([[1,"张三",18,90],[2,"李四",19,80],[3,"王五",20,100]])


